]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
osdWindow: Fix setting a zero-level in osdWindow
authorBastien Nocera <hadess@hadess.net>
Fri, 25 Apr 2014 13:14:22 +0000 (15:14 +0200)
committerBastien Nocera <hadess@hadess.net>
Fri, 25 Apr 2014 13:20:18 +0000 (15:20 +0200)
Commit 7101cc3170bf727aebf918f37debff94ae705c85 caused a small
regression insomuch that it checks for a valid "level" but simply using
"if (level)" which will be false if level is undefined and if
level == 0.

Check for not undefined instead.

https://bugzilla.gnome.org/show_bug.cgi?id=727384

js/ui/osdWindow.js

index 1916812bf548877bcd67edb04ca82258d09d5610..6263070d1ad6553c1c04ed5e2f21a222c771c5f8 100644 (file)
@@ -127,7 +127,7 @@ const OsdWindow = new Lang.Class({
 
     setLevel: function(level) {
         this._level.actor.visible = (level != undefined);
-        if (level) {
+        if (level != undefined) {
             if (this.actor.visible)
                 Tweener.addTween(this._level,
                                  { level: level,